Skip to content

refactor: native macOS inspector with dense layout and inline picker actions#900

Merged
datlechin merged 1 commit into
mainfrom
refactor/native-inspector
Apr 27, 2026
Merged

refactor: native macOS inspector with dense layout and inline picker actions#900
datlechin merged 1 commit into
mainfrom
refactor/native-inspector

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Switch inspector field list from List(.sidebar) to List(.inset) with hidden row separators for compact density
  • Add inspectorTrackingSeparator to toolbar for three-zone visual alignment (sidebar | content | inspector)
  • Add PK/FK column metadata to inspector: yellow key icon for primary keys, arrow icon for foreign keys
  • Integrate Set NULL/DEFAULT actions directly into enum, boolean, and set picker dropdowns (no hover overlay on pickers)
  • Keep hover FieldMenuView on text/json/blob fields for Set NULL, SQL Functions, Copy Value, etc.
  • Picker fields handle NULL display natively in dropdown style (no text-field fallback)
  • Remove "Save Changes" button from inspector (Cmd+S and toolbar save still work)
  • Tighten inspector width to 270-400pt, remove explicit background override
  • Add .labelsHidden() to prevent Form label duplication in field editors
  • Add Divider between segmented picker and content in header

Test plan

  • Select a row in a table with PK/FK columns, verify key icons appear
  • Verify toolbar has three-zone separator between content and inspector
  • Test Set NULL on an enum field: picker stays in dropdown style showing "NULL"
  • Save the NULL value, verify picker still shows "NULL" after refresh
  • Select a different enum value from the dropdown to clear NULL
  • Hover over a text field, verify FieldMenuView chevron appears
  • Hover over an enum picker, verify no overlay chevron (use dropdown instead)
  • Search fields using the search bar
  • Test table info mode (no row selected) still shows grouped Form sections
  • Verify inspector width range 270-400pt by dragging the divider

@datlechin datlechin force-pushed the refactor/native-inspector branch from 3bc76ef to 1e7ed87 Compare April 27, 2026 07:23
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bc76ef956

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +19 to +23
let isNullValue = context.originalValue == nil && !isPendingDefault
let displayValue: String = {
if isPendingNull || isNullValue { return Self.nullSentinel }
if isPendingDefault { return Self.defaultSentinel }
return normalizeBooleanValue(context.value.wrappedValue)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Base NULL selection on effective value, not original value

When a boolean/enum field starts as NULL, selecting a concrete value does not update the picker display because isNullValue is computed from context.originalValue. originalValue stays nil until a refresh, so the binding getter keeps returning the NULL sentinel even after context.value has been changed, making the control appear stuck on NULL (same pattern is present in EnumPickerView). This breaks the expected "pick a value to clear NULL" flow in the inspector.

Useful? React with 👍 / 👎.

Comment on lines 18 to 19
? String(localized: "No selection")
: context.value.wrappedValue
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show pending NULL/DEFAULT state in SET picker label

The SET picker label is now derived only from context.value.wrappedValue, but setFieldToNull/setFieldToDefault store state in flags while leaving pendingValue as nil. Because picker fields no longer use PendingStateOverlay, choosing "Set NULL" or "Set DEFAULT" can leave the label showing the old value, so users get no visible confirmation that a NULL/DEFAULT edit is pending.

Useful? React with 👍 / 👎.

@datlechin datlechin merged commit 96b566c into main Apr 27, 2026
2 checks passed
@datlechin datlechin deleted the refactor/native-inspector branch April 27, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant